package org.xxforest.game.core;

import org.xxforest.game.core.common.XXData;
import org.xxforest.game.core.scenes.scene2d.XXNode;
import org.xxforest.game.core.tween.XXNodeAccessor;
import org.xxforest.game.core.utils.XXAppUtils;
import org.xxforest.game.core.utils.XXAssetUtils;
import org.xxforest.game.core.utils.XXGdxUtils;

import aurelienribon.tweenengine.Tween;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Texture;

public class XX {

	public static final XXGdxUtils gdx = XXGdxUtils.getInstance();
	
	public static final XXAppUtils app = XXAppUtils.getInstance() ;
	
	public static final XXData data = XXData.getInstance() ;
	
	public static final XXAssetUtils asset = XXAssetUtils.getInstance();
	
	public static final XXDirector director = XXDirector.getInstance();
	
	public static void init() {
		
		Texture.setEnforcePotImages(false) ;
		//GameData
		data.init();
		director.init() ;
		
		Tween.setWaypointsLimit(10);
		Tween.setCombinedAttributesLimit(3);
		Tween.registerAccessor(XXNode.class, new XXNodeAccessor());
		
	}
	
	public static void log(String tag , String message){
		Gdx.app.log(tag, message);
	}
	
	public static void log(Exception e, String tag , String message){
		Gdx.app.log(tag, message ,e);
	}
}
